/*
 * =====================================================================================
 *
 *       Filename:  output.h
 *
 *    Description:  result output
 *
 *        Version:  1.0
 *        Created:  08/10/2009 03:25:25 PM
 *       Revision:  none
 *       Compiler:  gcc
 *
 *         Author:  Zhao Zhao 
 *        Company:  ndssl
 *
 * =====================================================================================
 */
#pragma once

#include "include.h"
#include "graph.h"
#include "utils.hpp"
using namespace std;

/* 
 * ===  FUNCTION  ======================================================================
 *         Name:  PrintRawDataFile
 *  Description:  output raw data to file "graph_measure.data"
 * =====================================================================================
 */
void PrintRawDataFile(string gTitle, string measure, MeasureVec val, VSize size, Index index);

/* 
 * ===  FUNCTION  ======================================================================
 *         Name:  GenPlotScript
 *  Description:  generate plot script for gnuplot, and plot eps file 
 *  			  output file will be "graph_measure.plt" and "graph_measure.eps"
 * =====================================================================================
 */
void GenPlotScript(string gTitle, string measure);


/* 
 * ===  FUNCTION  ======================================================================
 *         Name:  CalDist
 *  Description:  calculate histogram of an array of values, 
 *                and output to "graph_measure.dist" file
 * =====================================================================================
 */
void CalDist(MeasureVec valVec, VSize size, float step, string gTitle, string measure);


/* 
 * ===  FUNCTION  ======================================================================
 *         Name:  PrintStatFile
 *  Description:  print statistic data to "graph_measure.stat", 
 *  			  including maxN max values, minN min values, mean value, etc.
 * =====================================================================================
 */

void PrintStatFile(string gTitle, string measure, const MeasureVec valVec, const VSize gSize, Index index, const int maxN, const int minN);

